package com.bckj.fastboot.iot.biz.controller;

import com.bckj.fastboot.core.lang.model.PageResult;
import com.bckj.fastboot.core.page.PageSupport;
import com.bckj.fastboot.iot.api.service.IotProtocolDisplaySetRemoteService;
import com.bckj.fastboot.iot.biz.service.IotProtocolDisplaySetService;
import com.bckj.fastboot.iot.common.dto.query.IotProtocolDisplaySetQuery;
import com.bckj.fastboot.iot.common.dto.request.IotProtocolDisplaySetRequest;
import com.bckj.fastboot.iot.common.dto.response.IotProtocolDisplaySetResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * IotProtocolDisplaySetController
 *
 * @author wfc
 **/
@RestController
@RequiredArgsConstructor
@RequestMapping("iotProtocolDisplaySet")
public class IotProtocolDisplaySetController implements IotProtocolDisplaySetRemoteService {

    private final IotProtocolDisplaySetService iotProtocolDisplaySetService;

    @Override
    public boolean save(IotProtocolDisplaySetRequest request) {
        return iotProtocolDisplaySetService.save(request);
    }

    @Override
    public boolean update(IotProtocolDisplaySetRequest request) {
        return iotProtocolDisplaySetService.update(request);
    }

    @Override
    public IotProtocolDisplaySetResponse details(Long id) {
        return iotProtocolDisplaySetService.details(id);
    }

    @Override
    public PageResult<IotProtocolDisplaySetResponse> page(IotProtocolDisplaySetQuery query) {
        return iotProtocolDisplaySetService.page(PageSupport.buildPage(), query);
    }
}
